﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MapViewer.Loaders
{
	[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
	public sealed class LoaderTypeAttribute : Attribute
	{
		public Type LoaderType { get; set; }

		public LoaderTypeAttribute()
		{
		}

		internal ILoader Instance
		{
			get
			{
				if (LoaderType == null)
					return null;
				return LoaderType.GetConstructor(Type.EmptyTypes).Invoke(null) as ILoader;
			}
		}
	}
}
